







[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Reverses the order of comparison of an IComparer<T>. The resulting comparer can be used,
for example, to sort a collection in descending order. Equality and hash codes are unchanged.
Namespace: Wintellect.PowerCollections
Assembly:
PowerCollections (in PowerCollections.dll)
Syntax
C# |
---|
public static IComparer<T> GetReverseComparer<T>( IComparer<T> comparer ) |
Visual Basic (Declaration) |
---|
Public Shared Function GetReverseComparer(Of T) ( _ comparer As IComparer(Of T) _ ) As IComparer(Of T) |
Visual C++ |
---|
public: generic<typename T> static IComparer<T>^ GetReverseComparer ( IComparer<T>^ comparer ) |
Parameters
- comparer
- IComparer<(Of <T>)>
The comparer to reverse.
Return Value
An IComparer<T> that compares items in the reverse order of comparer.
Type Parameters
- T
- The type of items thta are being compared.
Exceptions
Exception | Condition |
---|---|
System..::ArgumentNullException | comparer is null. |
See Also
Algorithms Class
Wintellect.PowerCollections Namespace